<template>
  <div class="app">
   <div class="header">
    <van-nav-bar title="新购物" left-text="返回" left-arrow @click-left="goBack">
    <template #right>
        <van-icon name="search" size="18" />
    </template>
</van-nav-bar>
   </div>
   <div class="main">
    <router-view/>
   </div>
   <div class="footer">
     <router-view name="shop-footer"/>
   </div>
  </div>
</template>
<script>
export default {
  methods: {
    goBack () {
      this.$router.go(-1)
      console.log(1)
    }
  }
}
</script>

<style lang="scss">
html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/*******************
 Core body defaults
 @see https://hankchizljaw.com/wrote/a-modern-css-reset/
 *******************/
body {
  min-height: 100vh;
  scroll-behavior: smooth;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/****************************
 Generic Margins and Paddings
 ****************************/
body,
h1,
h2,
h3,
h4,
h5,
h6,
ul,
ol,
li,
p,
pre,
blockquote,
figure,
figcaption,
hr,
dl,
dd {
  margin: 0;
  padding: 0;
}

/*******************
 Lists
 *******************/
ul {
  list-style: none;
}

/*******************
 Forms and buttons
 *******************/
input,
textarea,
select,
button {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

/* I usually expand input and textarea to full-width */
input[type="text"],
textarea {
  width: 100%;
}

/* More friendly border */
input,
textarea,
button {
  border: 1px solid gray;
}

/* Some defaults for one-liner buttons */
button {
  padding: 0.75em 1em;
  line-height: inherit;
  border-radius: 0;
  background-color: transparent;
}

button * {
  pointer-events: none;
}

/***********************************
 Easy responsive for media elements
 ***********************************/
img,
iframe,
video,
object,
embed {
  display: block;
  max-width: 100%;
}

svg {
  max-width: 100%;
}

/*******************
 Useful table styles
 *******************/
table {
  table-layout: fixed;
  width: 100%;
}

/*******************
 The hidden attribute
 *******************/
[hidden] {
  opacity: 0;
  visibility: hidden;
}

/*******************
 Noscript
 *******************/
noscript {
  display: block;
  margin-bottom: 1em;
  margin-top: 1em;
}

/*******************
 Tabindex
 *******************/
[tabindex="-1"] {
  outline: none !important;
}

/*******************
 Remove animations and transitions
 @see https://hankchizljaw.com/wrote/a-modern-css-reset/
 *******************/
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/*******************
 * Screen-ready only class to hide content visually
 * Solution by Joe Watkins.
 * @see https://zellwk.com/blog/hide-content-accessibly/
 *******************/
.sr-only {
  position: absolute;
  width: 1px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

html,
body,
.app{
  height: 100%;
  width: 100%;
}
.app{
  display: flex;
  flex-direction: column;
  .main{
    flex: 1;
    overflow-x: hidden;
  }
}
.header{
  .van-nav-bar{
    background-color: #FFD000 ;
  }
  .van-nav-bar__text,
  .van-nav-bar .van-icon,
  .van-nav-bar__title {
    font-weight:bolder ;
    color: black;
  }
}
a{
  text-decoration: none;
  outline: none;
}
.footer{
  height: 50px;
}
</style>
